import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:递归求 N 的阶乘
 * User: zjc
 * Date: 2022-05-11
 * Time: 22:40
 */
public class Project {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sum = fac(n);
        System.out.println(sum);
    }
    public static int fac(int n){
        if(n == 1){
            return 1;
        }else{
            return n*fac(n-1);
        }
    }
}
